<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" href="./images/favicon.ico" type="image/x-icon" />
    <link rel="shortcut icon" href="./images/favicon.ico" type="image/x-icon" />
    <title>在线技术社区-文章页</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="./css/myPagination.css" rel="stylesheet">
    <link href="./css/news.css" rel="stylesheet">
</head>

<body>
    <nav class="navbar navbar-default">
        <div class="container">
            <div class="container-fluid">
                <!-- Brand and toggle get grouped for better mobile display -->
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
                        aria-expanded="false">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <span class="navbar-brand">
                        <img src="./images/logo1.png">
                        <a href="#">技术社区</a>
                    </span>
                </div>


                <!-- Collect the nav links, forms, and other content for toggling -->
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <ul class="nav navbar-nav">
                        <li class="li1">
                            <a href="#">首页</a>
                        </li>
                        <li class="li2">
                            <a href="#">
                                <img src="./images/下载.png" width="15px" height="15px"> 下载</a>
                        </li>
                        <li class="li3">
                            <a href="#">
                                <img src="./images/上传.png" width="15px" height="15px"> 上传</a>
                        </li>
                    </ul>
                    <ul class="nav navbar-nav" id="navbar-nav2">
                        <li class="li4">
                            <a href="#">
                                <img src="./images/消息.png" width="15px" height="15px">&nbsp 消息</a>
                        </li>
                        <li class="li5">
                            <a href="./login.html">登录</a>
                        </li>
                        <li class="li6">
                            <a href="./loginsum.html">注册</a>
                        </li>
                    </ul>
                    <form class="navbar-form navbar-left">
                        <div class="form-group">
                            <input type="text" class="form-control" placeholder="搜索">
                        </div>
                        <button type="submit" class="btn btn-default">确认</button>
                    </form>
                </div>
            </div>
        </div>
    </nav>
    <div class="container">
        <div class="return-personal">
            <p>
                <a href="./index.html">首页</a>>>
                <a href="#">赛事圈</a>>>
                <a href="#">赛事公告</a>
            </p>
        </div>
        <div class="sub">
            <div class="top">
                <p>详细通知</p>
            </div>
            <div class="biankuang">
                <div class="juzhong">
                    <h2>PS设计大赛</h2>
                </div>
                <div>
                    <div class="row views">
                        <div class="col-md-5">
                            <p>发行时间：2018.11.7 22：45：43</p>
                        </div>
                        <div class="col-md-4">
                            <p>通讯员:编辑者姓名</p>
                        </div>
                        <div class="col-md-3">
                            <p>访问次数：22222</p>
                        </div>
                    </div>
                </div>
                <div class="media content">
                    <div class="media-body">
                        <span>内容内容内容:
                            <br>测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试试测试试测试</span>
                    </div>
                </div>
            </div>

        </div>
        <div class="foot">
            <div class="link">
                <span>
                    <a href="#">关于我们</a>
                </span>
                <span>|</span>
                <span>
                    <a href="#">联系我们</a>
                </span>
                <span>|</span>
                <span>
                    <a href="#">友情链接</a>
                </span>
            </div>
            <div class="copyright">
                <span>版权所有©&nbsp;&nbsp;长江大学&nbsp;&nbsp;长大在线信息传媒</span>
            </div>
        </div>

        <script>
            document.getElementsByClassName('img')[0].onclick = function () {
                console.log(1);
                document.getElementById('imgFile').click();

            }
            function imgPreview(fileDom) {
                //判断是否支持FileReader
                if (window.FileReader) {
                    var reader = new FileReader();
                } else {
                    alert("您的设备不支持图片预览功能，如需该功能请升级您的设备！");
                }

                //获取文件
                var file = fileDom.files[0];
                var imageType = /^image\//;
                //是否是图片
                if (!imageType.test(file.type)) {
                    alert("请选择图片！");
                    return;
                }
                //读取完成
                reader.onload = function (e) {
                    //获取图片dom
                    var img = document.getElementById("preview");
                    //图片路径设置为读取的图片
                    img.src = e.target.result;

                    // ajax 上传图片  
                    $.post("upload_h5.php", { img: e.target.result }, function (ret) {
                        if (ret.img != '') {
                            alert('upload success');
                            $('#showimg').html('<img src="' + ret.img + '">');
                        } else {
                            alert('upload fail');
                        }
                    }, 'json');
                };
                reader.readAsDataURL(file);

            }
        </script>
        <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
</body>

</html>